function checkEmail(email){
	return RegExp(/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z0-9]{2,3}$/).test(email);
}
function checkPhone(phone){
	return RegExp(/^1[34578]\d{9}$/).text(phone);
}
function checkTaxId(taxid){
	var regArr = [/[\da-z]{10,15}$/i,/^\d{6}[\da-z]{10,12}$/i,/^[a-z]\d{6}[\da-z]{9,11}$/i,/^[a-z]{2}\d{6}[\da-z]{8,10}$/i,/^\d{14}[\dx][\da-z]{4,5}$/i,/^\d{17}[\dx][\da-z]{1,2}$/i, /^[a-z]\d{14}[\dx][\da-z]{3,4}$/i, /^[a-z]\d{17}[\dx][\da-z]{0,1}$/i, /^[\d]{6}[\da-z]{13,14}$/i];
	let j = regArr.length;
	for (let i=0;i<j;i++){
		if(regArr[i].test(taxid)){
			return true;
		}
	}
	return false;
}
module.exports = {
	checkEmail : checkEmail,
	checkPhone : checkPhone,
	checkTaxId : checkTaxId
}